This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
~Zach Lopresterakol 10.Nov.03 07:22 PM a Web browser Domino Server6.0.1Windows 2000
Hi:
BACKGROUND:
I have a LS agent that calls a batch file.
PROBLEM:
When this batch file is called it calls the agent in the console window rather than an external DOS window.
SOLUTION?
Can you explain this as it is causing problems as I want the agent to wait until the external window looses focus and then continues.
Here is my code for the agent to wait until the batch file cmd screen looses focus:
RunApp:
Sub RunApp (program$)
structure:
start.cb = Len(start)
ret& = CreateProcessA(0&, program$, 0&, 0&, 1&, NORMAL_PRIORITY_CLASS, 0&, 0&, start, proc)
ret& = WaitForSingleObject(proc.hProcess, INFINITE)
ret& = CloseHandle(proc.hProcess)
End Sub
'Set current directory using UNC path so extractor can be run from clients
Chdrive "c"
Chdir "c:\utils\doti\extractor\src"
' taskId% = Shell("extractor.bat", 1)
Print " ******* Extractor Opened *********"
RunApp("c:\utils\doti\extractor\src\extractor.bat")
Print " ******* Extractor Closed *********"
qryediflag.SQL = "DELETE FROM XML_FLAG"
resultediflag.Execute
'Vaildation of xml document is performed from extractor program. Therefore the xml file is not created is not valid.
Print " ********** XML FILE Successfully Generated ******* "
End If